package com.silence.Interface_test;

import java.util.ArrayList;

public class StudentOperatorImpl1 implements StudentOperator{

    @Override
    public void printAllInfo(ArrayList<Student> students) {
        System.out.println("----------全班全部信息1----------");
        for (Student student : students) {
            System.out.println(student);
        }
        System.out.println("------------------------------");
    }

    @Override
    public void printAverageScore(ArrayList<Student> students) {
        int sum = 0;
        for (Student student : students) {
            sum += student.getScore();
        }
        System.out.println("-----------全班平均分1-----------");

        System.out.println("平均分:"+sum/students.size());
        System.out.println("------------------------------");

    }
}
